const http = require('http')
const fs = require('fs')

const server = http.createServer((request, response) => {
    fs.readFile(__dirname + '/index.html', (err, html) => {
        console.log(err)
        if (err === null) {
            response.end(html)
        }
    })
})
server.listen(9090, () => {
    console.log('服务启动')
})